<template>
  <div class="top">
    <div class="Carousel">
      <Carousel v-model="value1" loop :height="498">
        <CarouselItem>
          <div class="demo-carousel"></div>
        </CarouselItem>
        <CarouselItem>
          <div class="demo-carousel"></div>
        </CarouselItem>
        <CarouselItem>
          <div class="demo-carousel"></div>
        </CarouselItem>
        <CarouselItem>
          <div class="demo-carousel"></div>
        </CarouselItem>
      </Carousel>
    </div>

    <div class="swiper-right-box">
      <!-- 用户登录 -->
      <div class="user-info">
        <div class="user-head">
          <img class="nologin" src="static/picture/head.png" alt="" />
        </div>
        <div class="nologin user-login">
          <div class="username">欢迎您的到来~</div>
          <a
            class="register-btn"
            href="/User/reg.html"
            target="_blank"
            rel="noopener noreferrer"
            >立即注册</a
          >
          <a
            class="login-btn"
            href="/User/login.html"
            target="_blank"
            rel="noopener noreferrer"
            >登录</a
          >
        </div>
      </div>
      <!-- 商城公告 -->
      <div class="shop-notice border-box">
        <div class="shop-notice-title border-box">
          <span>怀集县安业电器贸易有限公司 </span>
        </div>
      </div>
      <a class="shopin" href="javascript:;" target="_blank"></a>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeTop",
  data(){
      return{
          value1: 0
      }
  }
};
</script>

<style lang="scss" scoped>
.top{
  height: 510px;
}
.Carousel{
  float: left;
    position: relative;
    height: 100%;
    width: 788px;
    overflow: hidden;
    margin-left: 208px;
}
.swiper-right-box {
    float: right;
    width: 200px;
    height: 498px;
    overflow: hidden;
    margin-top: 6px;
}
.user-info {
    width: 100%;
    height: 244px;
    margin: 30px 0 0;
    background-color: #62647e;
    position: relative;
}
.user-info .user-head {
    width: 80px;
    height: 80px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: -30px;
    left: 50%;
    margin-left: -40px;
    background-color: #fff;
    -webkit-box-shadow: 0 0 8px 0 rgba(81,40,49,.08);
    -moz-box-shadow: 0 0 8px 0 rgba(81,40,49,.08);
    box-shadow: 0 0 8px 0 rgba(81,40,49,.08);
}
.user-info .user-head img.nologin {
    width: 45px;
    height: 51px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -25px;
    margin-left: -22.5px;
}
.user-info .nologin a {
    display: block;
    font-size: 14px;
    text-align: center;
}
.user-info .nologin a.login-btn {
    color: #fff;
    text-decoration: underline;
    margin-top: 8px;
}
.user-info .nologin a.register-btn {
    width: 100px;
    height: 32px;
    line-height: 32px;
    background-color: #f4f4f4;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    margin: 30px auto 0;
    color: #333;
}

.user-info .nologin a.login-btn {
    color: #fff;
    text-decoration: underline;
    margin-top: 8px;
}
.user-info .user-login {
    padding-top: 50px;
    overflow: hidden;
}

.user-info .user-login .username {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    color: #fff;
}
.shop-notice {
    width: 100%;
    height: 150px;
    margin-top: 6px;
    position: relative;
}
.shop-notice-title span {
    line-height: 50px;
    color: #333;
    font-size: 18px;
    position: relative;
    font-weight: 700;
}
.shopin {
    height: 68px;
    width: 100%;
    text-align: center;
    font-size: 24px;
    line-height: 68px;
    font-weight: 700;
    color: #fff;
    display: block;
}
.shopin, .shopin i {
    background: url(~@/assets/images/home/shopin.png) no-repeat;
}
</style>